package org.example.demo3.common;

import org.example.demo3.info.Userinfo;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class Session {
    public static Userinfo getsession(HttpServletRequest request){
        HttpSession session=request.getSession(false);
        if (session==null){
            return null;
        }
        return (Userinfo) session.getAttribute(UserSessionID.usersession);
    }
}
